Skip to content

Conversation

@warcooft
Copy link
Contributor

Description
Fixes nullCoalesce.variable errors. Superglobals like $_GET and $_POST are always defined by PHP, coalescing to arrays is not required.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@neznaika0
Copy link
Contributor

The correction requires other actions. What do you think about superglobals() ? Is it time for a substitution?

@warcooft warcooft force-pushed the null-coalesce-variable branch from e211a7d to 92ab64d Compare April 14, 2025 05:57
@michalsn michalsn added the refactor Pull requests that refactor code label Apr 14, 2025
@warcooft warcooft requested a review from samsonasik April 14, 2025 06:35
@paulbalandan paulbalandan changed the title refactor: fix nullCoalesce.variable errors refactor: fix nullCoalesce.variable errors Apr 14, 2025
rm nullCoalesce.variable.neon

Update error count

Restore missing nullCoalesce.variable.neon file

Update loader.neon and remove obsolete nullCoalesce.variable.neon

Use type checking instead of null coalescing

Prevent superglobals from being changed by users

chore: suppress PHPStan warning for  and
@warcooft warcooft force-pushed the null-coalesce-variable branch from 15b3540 to ee0580f Compare April 14, 2025 13:35
Co-authored-by: John Paul E. Balandan, CPA <[email protected]>
@warcooft
Copy link
Contributor Author

Thank you @paulbalandan

@warcooft warcooft requested a review from paulbalandan April 14, 2025 14:03
@paulbalandan paulbalandan merged commit 92ff74e into codeigniter4:develop Apr 15, 2025
49 checks passed
@warcooft warcooft deleted the null-coalesce-variable branch April 15, 2025 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Pull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants